class CreateOrderItems < ActiveRecord::Migration
  def self.up
    create_table :order_items do |t|
      t.integer :enterprise_id
      t.integer :order_id
      t.string :furniture_code,
               :furniture_name,
               :furniture_spec,
               :furniture_color
      t.integer :feed_id
      t.integer :ordered_count,
        :default => 0
      t.decimal :after_serviced_cost, :default => 0,
                :precision => 8, :scale => 2
      t.text :remark,
        :complete_remark
      t.integer :updated_by_user_id
      t.timestamps
    end
  end

  def self.down
    drop_table :order_items
  end
end
